﻿using Assets.Scripts.Net.Data.Model;
using UnityEngine.UI;

namespace Assets.Scripts.UI.Item
{
    /// <summary>
    /// 学习成绩的Item
    /// </summary>
    public class GradeItem:UIBase<GradeItem>
    {
        public Text CourseText;//课程
        public Text ScoreText;//分数

        protected override UIType UIType
        {
            get { return UIType.Item;}
        }
        protected override void InitOnAwake()
        {
            AutoFindComponent(transform, true);
        }

        public void Init(StudyInfo info)
        {
            CourseText.text = info.Course;
            ScoreText.text = info.Score;
        }
    }
}